package com.encryption.service.util;

import com.encryption.dao.FileLogDAO;
import com.encryption.model.FileLog;
import com.encryption.model.User;

/**
 * 
 * @author user
 * @version $Id: FileAccessLogUtil.java,v 0.1 2012-11-18 下午07:52:50 user Exp $
 */
public class FileAccessLogUtil {
    
    public static void record(FileLogDAO fileLogDAO, User user, int fileId, int fileAction) {
        FileLog log = new FileLog();
        log.setFile(fileId);
        log.setId(user.getId());
        log.setFileAction(fileAction);
        fileLogDAO.save(log);
    }
}
